gridpack::component::BaseComponent Class Reference

#include <base_component.hpp>

Inheritance diagram for gridpack::component::BaseComponent:
Inheritance graph
[legend]
Collaboration diagram for gridpack::component::BaseComponent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BaseComponent (void)
virtual ~BaseComponent (void)
virtual void load (const boost::shared_ptr< gridpack::component::DataCollection > &data)
virtual int getXCBufSize (void)
virtual void setXCBuf (void *buf)
virtual void getXCBuf (void **bus)
virtual void setMode (int mode)
virtual bool serialWrite (char *string, const int bufsize, const char *signal=NULL)
virtual void saveData (boost::shared_ptr< gridpack::component::DataCollection > data)
virtual bool getDataItem (void *data, const char *signal=NULL)
void setRank (int rank)
int getRank (void) const

Constructor & Destructor Documentation

gridpack::component::BaseComponent::BaseComponent ( void   ) 

Simple constructor

virtual gridpack::component::BaseComponent::~BaseComponent ( void   )  [virtual]

Destructor


Member Function Documentation

virtual bool gridpack::component::BaseComponent::getDataItem ( void *  data,
const char *  signal = NULL 
) [virtual]

Retrieve an opaque data item from component. Different items may be returned based on the value of signal.

Parameters:
data item to retrieve from component
signal string to control behavior of routine (e.g. what data item to return)
Returns:
true if component is returning data element, false otherwise
int gridpack::component::BaseComponent::getRank ( void   )  const

Get rank holding the component

Returns:
processor rank holding the component
virtual void gridpack::component::BaseComponent::getXCBuf ( void **  bus  )  [virtual]

Return the location of the data exchange buffer

Parameters:
buf void pointer to exchange buffer
virtual int gridpack::component::BaseComponent::getXCBufSize ( void   )  [virtual]

Return the size of the buffer needed for data exchanges. Note that this must be the same size for all bus and all branch objects (branch buffers do not need to be the same size as bus buffers), even if all objects do not require the same parameters. Thus, the buffer must be big enough to exchange all variables that an object might need, even if individual objects don't need all the variables

Returns:
size of buffer

Reimplemented in gridpack::powerflow::PFBus, and gridpack::state_estimation::SEBus.

virtual void gridpack::component::BaseComponent::load ( const boost::shared_ptr< gridpack::component::DataCollection > &  data  )  [virtual]
virtual void gridpack::component::BaseComponent::saveData ( boost::shared_ptr< gridpack::component::DataCollection data  )  [virtual]

Save state variables inside the component to a DataCollection object. This can be used as a way of moving data in a way that is useful for creating output or for copying state data from one network to another.

Parameters:
data data collection object into which new values are inserted

Reimplemented in gridpack::powerflow::PFBus, and gridpack::state_estimation::SEBus.

virtual bool gridpack::component::BaseComponent::serialWrite ( char *  string,
const int  bufsize,
const char *  signal = NULL 
) [virtual]

Copy a string for output into buffer. The behavior of this method can be altered by inputting different values for the signal string

Parameters:
string buffer containing string to be written to output
bufsize size of string buffer in bytes
signal string to control behavior of routine (e.g. what properties to write)
Returns:
true if component is writing a contribution, false otherwise

Reimplemented in gridpack::powerflow::PFBus, gridpack::powerflow::PFBranch, gridpack::state_estimation::SEBus, and gridpack::state_estimation::SEBranch.

virtual void gridpack::component::BaseComponent::setMode ( int  mode  )  [virtual]

Set an internal variable that can be used to control the behavior of the component. This function doesn't need to be implemented, but if needed, it can be used to change the behavior of the network in different phases of the calculation. For example, if a different matrix needs to be generated at different times, the mode of the calculation can changed to get different values from the MatVecInterface functions

Parameters:
mode integer indicating which mode should be used

Reimplemented in gridpack::ymatrix::YMBus, gridpack::ymatrix::YMBranch, gridpack::powerflow::PFBus, gridpack::powerflow::PFBranch, gridpack::state_estimation::SEBus, and gridpack::state_estimation::SEBranch.

void gridpack::component::BaseComponent::setRank ( int  rank  ) 

Set rank holding the component

Parameters:
rank processor rank holding the component
virtual void gridpack::component::BaseComponent::setXCBuf ( void *  buf  )  [virtual]

Assign the location of the data exchange buffer. These buffers are allocated and deallocated by the network

Parameters:
buf void pointer to exchange buffer

Reimplemented in gridpack::powerflow::PFBus, and gridpack::state_estimation::SEBus.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 3 Feb 2020 for GridPACK by  doxygen 1.6.1